<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<title>赌我会瘦</title>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>
</head>
<!-- end header -->

<body>
  <div class="page-group">
    <div class="page page-current withdrawal-page  bg-light-gray">
      <header class="bar bar-nav fb-header">
        <a href="${ctx.host}/profile" class="icon icon-left pull-left"></a>
          <h1 class="title">提现</h1>
        </header>
        <div class="bar bar-footer fb-footer">
          <c:if test="${wallet.balance == 0}">
            <button class="button button-block button-big fb-button draw-button" disabled>暂无可提现金额</button>
          </c:if>
          <c:if test="${wallet.balance > 0}">
            <a href="javascrpt:void(0);" class="button button-big fb-button draw-button">申请提现</a>
          </c:if>
        </div>
      <div class="content">
        <div class="user-header clearfix">
          <div class="user-cover">
            <img src="${personal.avatar}" alt="" class="img-style">
          </div> 
          <div class="balance">
            <p class="no-margin">可提现余额(元)</p>
            <p style="font-size: 1.5rem; margin: 0;"><i class="iconfont icon-money" style="font-size: 1.3rem;"></i>
              <fmt:formatNumber value="${wallet.balance / 100}" pattern="0.00"></fmt:formatNumber>
            </p>
          </div>
        </div>
        <div class="draw-money">
          <p class="no-margin" style="font-size: .75rem; color: #333;">输入提现金额</p>
          <input type="text" class="cash" name="" value="" placeholder="0.00" data-max="${wallet.balance}">
          <p style="margin: .25rem 0 0 0; font-size: .6rem; color: #c2c2c2;">余额可用于参与活动及竞猜</p>
        </div>
        
        <div class="text-center" style="position: absolute; width: 100%; 
        bottom: .5rem; color: #333; font-size: .65rem;">温馨提示：发起提现申请后客服将在48小时内与您联系。</div>
      </div>
    </div>
  </div>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/profile/withdrawal-index.js" />
  <script type="text/javascript">
    require(['page/profile/withdrawal-index'], function(page) {
      page.init({
        "jsConfig": JSON.parse('${jsConfig}'),
        "avatar": '${user.avatar}'
      })
    })
  </script>
</body>
</html>